//---------------------------------------------------------------------------
#ifndef EmpresasH
#define EmpresasH

//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "Cadpad.h"
#include "PHDS.h"
#include <Buttons.hpp>
#include <ExtCtrls.hpp>
#include <Menus.hpp>
#include "PHEdit.h"
#include "PHLabel.h"
#include "CGAUGES.h"
#include "PHMemo.h"
#include <ComCtrls.hpp>
#include "PHGridEd.h"
#include <Grids.hpp>
#include "PHCombo.h"

//---------------------------------------------------------------------------
class TCPEmpresas : public TCadPad1
{
__published:  // IDE-managed Components
  PHLabel*  PHLabel1;
  PHEdit*  PHEdit1;
  PHLabel*  PHLabel2;
  PHEdit*  PHEdit2;
  PHDataSource*  PHDS2;
  TSpeedButton*  SButton22;
  PHLabel*  PHLabel3;
  PHEdit*  PHEdit3;
  TPageControl*  PageControl1;
  TTabSheet*  TabSheet1;
  TTabSheet*  TabSheet2;
  PHLabel*  PHLabel10;
  PHEdit*  PHEdit10;
  PHEdit*  PHEdit11;
  PHLabel*  PHLabel11;
  PHEdit*  PHEdit14;
  PHLabel*  PHLabel14;
  PHEdit*  PHEdit24;
  PHLabel*  PHLabel25;
  PHLabel*  PHLabel4;
  PHEdit*  PHEdit4;
  PHEdit*  PHEdit5;
  PHLabel*  PHLabel5;
  PHEdit*  PHEdit6;
  PHLabel*  PHLabel6;
  PHEdit*  PHEdit7;
  PHLabel*  PHLabel7;
  PHEdit*  PHEdit8;
  PHLabel*  PHLabel8;
  PHEdit*  PHEdit9;
  PHLabel*  PHLabel9;
  PHEdit*  PHEdit12;
  PHLabel*  PHLabel12;
  PHEdit*  PHEdit13;
  PHLabel*  PHLabel13;
  PHLabel*  PHLabel15;
  PHEdit*  PHEdit19;
  PHEdit*  PHEdit20;
  PHLabel*  PHLabel16;
  PHLabel*  PHLabel17;
  PHEdit*  PHEdit21;
  PHEdit*  PHEdit22;
  PHLabel*  PHLabel18;
  TBitBtn*  BitBtn3;
  PHEdit*  PHEdit23;
  PHLabel*  PHLabel23;
  PHLabel*  PHLabel24;
  PHMemo*  PHMemo1;
  PHDataSource*  DSSoc;
  PHGridEdit*  PHGridEdit1;
 TGroupBox *GroupBox1;
 PHLabel *PHLabel19;
 PHEdit *PHEdit15;
 PHLabel *PHLabel20;
 PHEdit *PHEdit16;
 PHLabel *PHLabel21;
 PHComboBox *PHComboBox1;
 TSpeedButton *SPBCarRFB;
 PHLabel *PHLabel22;
 PHEdit *PHEdit17;
 PHLabel *PHLabel26;
 PHMemo *PHMemo2;
  void __fastcall FormDestroy( TObject* Sender );
  void __fastcall PHDS1StateChange( Estados State );
  void __fastcall PHDS1BeforeInsert( TObject* Sender );
  void __fastcall PHDS1AfterInsert( TObject* Sender );
  void __fastcall PHDS1AfterPost( TObject* Sender );
  void __fastcall PHDS1BeforePost( TObject* Sender );
  void __fastcall SpeedButton8Click( TObject* Sender );
  void __fastcall PHDS1BeforeEdit( TObject* Sender );
  void __fastcall PHDS1BeforeDelete( TObject* Sender );
  void __fastcall SButton22Click( TObject* Sender );
  void __fastcall PHDS1Post( TObject* Sender );
  void __fastcall PHEdit19Enter( TObject* Sender );
  void __fastcall PHEdit20Enter( TObject* Sender );
  void __fastcall PHEdit21Enter( TObject* Sender );
  void __fastcall PHEdit22Enter( TObject* Sender );
  void __fastcall PHEdit22Exit( TObject* Sender );
  void __fastcall BitBtn3Click( TObject* Sender );
  void __fastcall DSSocBeforePost( TObject* Sender );
  void __fastcall PHDS1AfterRead( TObject* Sender );
  void __fastcall FormShow( TObject* Sender );
 void __fastcall SPBCarRFBClick(TObject *Sender); private: // User declarations
  void __fastcall DefineDiretorioExplicito( void );
  void __fastcall FCInc(AnsiString Campo,int Elemento,AnsiString Conteudo);
  bool AtualizandoGrids;
  int NovoCodigo;
  int CodEmpExcl;
  int HandleExcl;

  public: // User declarations
      __fastcall TCPEmpresas( TComponent* Owner );
};

//---------------------------------------------------------------------------
extern PACKAGE TCPEmpresas*  CPEmpresas;

//---------------------------------------------------------------------------
#endif

